package com.foo.designpattern.proxy.dynamicproxy.cglibdynamicproxy;

import junit.framework.TestCase;

/**
 * com.foo.designpattern.proxy.proxy.dynamicproxy.cglibdynamicproxy
 * Created with IntelliJ IDEA.
 * User: wangyuxi
 * DateTime: 2016/4/1723:29
 *
 * @desc
 */
public class CglibProxyTestCase extends TestCase{

    public void  testWangPoWithJiaShiCglibProxy() {
        WangPo wangPo = new WangPo();
        JiaShi jiaShi = (JiaShi) wangPo.getProxy(JiaShi.class);
        jiaShi.happyWithMan();
        jiaShi.makeEyesWithMan();
    }
}
